#[cfg(test)]
mod tests {
    use std::mem;

    #[test]
    fn test_tuple_match() {
        let person: (bool, i32, f64) = (true, 30, 5.8);

        match person {
            (name, age, height) => {
                println!("Name: {}, Age: {}, Height: {}", name, age, height);
                // 输出：Name: true, Age: 30, Height: 5.8
            }
        }
    }

    #[test]
    fn test_macro_vec() {
        let person = vec!["Tom", "Jerry", "Mike"];
        println!("{:?}", person);

        let num = vec!["ads"; 3];
        println!("{:?}", num);
    }

    #[test]
    fn test_vec_capacity() {
        let mut vec: Vec<i32> = Vec::with_capacity(10);
        vec.push(42);
        println!("vec len : {:?}", vec.len());
        let size = mem::size_of_val(&vec);
        println!("size : {}", size);
        println!("{:?}", vec);
        assert!(vec.capacity() >= 10);

    }
}
